//package com.example.rabbitmqtopic;
//
//import org.springframework.amqp.core.Binding;
//import org.springframework.amqp.core.BindingBuilder;
//import org.springframework.amqp.core.Queue;
//import org.springframework.amqp.core.TopicExchange;
//import org.springframework.beans.factory.annotation.Qualifier;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
///**
// * @author canger
// * @Deseription topic模式的配置类
// * @create 2018/9/4 11:27
// **/
//@Configuration
//public class SenderConf {
//
//    @Bean(name = "topic.message")
//    public Queue queueMessage(){
//        return new Queue("topic.message");
//    }
//    @Bean(name = "test")
//    public Queue queueMessages(){
//        return new Queue("test");
//    }
//    /**
//    * @Description
//    * @author canger
//    * @date 2018/9/4 11:52
//    **/
//    @Bean
//    public TopicExchange exchange(){
//
//        return new TopicExchange("exchange");
//    }
//
//    /**
//     * @Description 将队列绑定到交换机上
//     * @author canger
//     * @date 2018/9/4 11:32
//     * @return org.springframework.amqp.core.Binding
//     **/
//    @Bean
//    Binding bindingExchangeMessage(@Qualifier("topic.message")Queue queueMessage,TopicExchange exchange){
//
//        return BindingBuilder.bind(queueMessage).to(exchange).with("topic.message");
//    }
//
//    @Bean
//    Binding bindingExchangeMessages(@Qualifier("test")Queue queueMessage,TopicExchange exchange){
//        //*表示一个词,#表示零个或多个词
//        return BindingBuilder.bind(queueMessage).to(exchange).with("test");
//    }
//}
